<template>
  <a-modal
    v-model:visible="props.reaiewVisible"
    title="评阅提醒"
    :okText="questions.pyzFlag ? '立即评阅' : '确定前往评阅'"
    @ok="emits('goPaperPage')"
    @cancel="emits('update:reaiewVisible', false)"
  >
    <div v-if="questions.pyzFlag" class="text-center p-[20px] text-[red] text-[16px]">
      你正在评阅{{ questions.tmlx }}:({{ questions.tmbh }})中，请前往评阅完成后抽取下一题！
    </div>
    <div v-else class="modal-content">
      <a-row>
        <span>您即将评阅的科目是：</span>
        <span class="subject"> {{ seleObj?.kmdm }}({{ seleObj?.kmmc }}) </span>
      </a-row>
      <a-row>
        <span>您即将评阅的题号是：</span>
        <span class="topic-type"> {{ questions.tmbh }} {{ questions.tmlx }}</span>
      </a-row>
    </div>
  </a-modal>
</template>

<script lang="ts" setup>
import { computed } from 'vue'
import { useTeacherMarkStore } from '/@/store/modules/teacherMark'
const teacherMarkStore = useTeacherMarkStore()
const questions = computed(() => teacherMarkStore.getQuestions || {})

const props = defineProps({
  seleObj: {
    type: Object,
    default: () => {},
  },
  reaiewVisible: {
    type: Boolean,
    default: false,
  },
})

const emits = defineEmits(['update:reaiewVisible', 'goPaperPage'])
</script>

<style lang="less" scoped>
.modal-content {
  padding: 16px;
  font-size: 18px;

  .subject,
  .topic-type {
    color: #1890ff;
    font-weight: 700;
  }
}
</style>
